#!/bin/bash

# 设置目标操作系统和架构
export GOOS=linux
export GOARCH=arm64

# 确保依赖项已下载
go mod download

# 静态编译
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -ldflags '-linkmode internal' -o  ./docker/arm64/bin/gbes-tts-server -mod=readonly ./cmd/api/main.go

# 测试生成的可执行文件
# ./app

echo "Build complete!"